<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
   <title>用户登录(User Login)</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
 
<script type="text/javascript">

	var msg ='<%=session.getAttribute("loginErrorMessage")%>';
	if (msg != ""&&msg!="null"&&msg!=null) {
	<%session.setAttribute("loginErrorMessage","");%>
		alert(msg);	
			
	}
 
</script>

<script type="text/javascript">
function check(){

 var name=document.getElementById('user');
 var pass=document.getElementById('password');
 
 if(!name.value){
 alert("请输入用户名!");
 name.focus();
 return false;
 }else if(!pass.value){
 alert("请输入密码!");
 pass.focus();
 return false;
 }
 }
</script>
  </head>
  
  <body>
     <body>
    
     	<br />
     	<br />
     	<br />
        <div align="center">
     	<img src="img/login.jpg" width=500px height=45px>
		</div>
     	<br />
     	<br />
     	<br />
     	<br />
     
     	
    	<form name="myform" action="login" method="post" onsubmit="return check()">
    	<table align="center">
    	<tr align="right">
    	<td>用户名：<input type="text" name="user.username" id="user" size="20" value="<s:property value="user.username"/>"/> 
    	</td>
    	</tr>
    	<tr align="right">
    	<td>密码 ：<input type="password" size="20" name="user.password" id="password" ></td>
    	</tr>
    	<tr align="center">
    	<td>
    	<input type=submit name=submit1 value="登录" >
    	
    	</td>
    	</tr>
    	</table>
    	</form>
    	
    	
  </body>
 
</html>
